<div class="form-area" id="project-form">
    <form action="/invitation/project_${behaviour}" method="post" id="form-project">
        <input type="hidden" name="method" value="do"/>
        <input type="hidden" name="CSRFToken" value="${CSRFToken!""}"/>
        <table width="100%" class="dj-form-base">
            <colgroup>
                <col width="120">
                <col width="*">
            </colgroup>
            <tbody>
            <tr>
                <th><em>*</em>项目名称:</th>
                <td class="input">
                    <input type="text" value="${(project.name)!}" maxlength="80" name="name" class="text J_checkInput" id="projectname-input">
                    <div style="display: none; " class="error">请填写项目名称</div>
                </td>
            </tr>
            <tr>
                <th><em>*</em>团队规模:</th>
                <td class="input">
                    <select name="teamScale" id="teamscale-select" class="J_checkInput">
                        <option value="">请选择</option>
                        <#list dictMap.DICT_TEAM_SCALE.data as item>
                            <option value="${item.id?c}"<#if project?? && project.teamScale?? && project.teamScale==item.id>selected</#if>>${item.name}</option>
                        </#list>
                    </select>
                    <div style="display: none; " class="error">请选择团队规模</div>
                </td>
            </tr>
            <tr>
                <th>项目简介:</th>
                <td class="input textarea-box"><textarea id="project-synopsis" class="textarea-con edit-textarea J_checkInput" blanksubmit="true" reg="^.{0,400}$" blankvalue="描述项目内容(限400字)" blankclass="g9" name="descr" maxnum="400"><#if project.descr??>${project.descr}</#if></textarea>
                    <p class="textarea-check-tip"><span class="J_lastNum g9"><span>0</span>/400</span></p>
                </td>
            </tr>
            <tr>
                <th><em>*</em>项目角色:</th>
                <td style="position:relative;" class="input">
                    <div style="position:relative;">
                        <input type="text" value="${(project.position)!}" maxlength="60" name="position" id="position-input" class="text J_checkInput">
                        <div style="display: none; " class="error">请填写项目角色</div>
                    </div>
                </td>
            </tr>

            <tr>
                <th><em>*</em>参与时间:</th>
                <#if (project.endDate)?? && project.endDate?string('yyyy-MM-dd') = '2030-01-01'>
                    <#assign endYear = ''/>
                    <#assign endMonth = ''/>
                    <#assign checked= "checked"/>
                <#else>
                    <#assign endYear = (project.endDate?string('yyyy'))!""/>
                    <#assign endMonth = (project.endDate?string('MM'))!""/>
                </#if>
                <td class="input">
                    <input type="text" reg="fun:$.formValidateFn.time,work,td" class="text year J_checkInput" id="startdate-year" name="start" maxlength="4" value="${(project.startDate?string('yyyy'))!}">
                    <span class="input">年</span>
                    <input type="text" class="text month" id="startdate-month" name="start" maxlength="2" value="${(project.startDate?string('MM'))!}">
                    <span class="input">月&nbsp;至</span>
                    <input type="text" class="text year" id="enddate-year" name="end" maxlength="4" value="${(endYear)!""}" <#if checked??>disabled </#if>>
                    <span class="input">年</span>
                    <input type="text" class="text month" id="enddate-month" name="end" maxlength="2" value="${(endMonth)!""}" <#if checked??>disabled </#if>>
                    <span class="input">月</span>
                    <input type="checkbox" class="checkbox radio" name="withoutEnd" value="present" id="enddate-present-checkbox" <#if checked??>checked</#if>>
                    <span class="checkbox f12" for="enddate-present-checkbox">至今</span>
                    <div style="display: none; " class="error">请填写正确的参与时间</div>
                </td>
            </tr>
            <tr>
                <th>项目成果:</th>
                <td class="input textarea-box">
                    <textarea id="project-merit" class="textarea-con edit-textarea J_checkInput" reg="^.{0,400}$" blanksubmit="true" blankvalue="描述你在项目执行过程中积累的能力及验证项目效果的指标（限400字）" blankclass="g9" name="achievement" maxnum="400"><#if project.achievement??>${project.achievement}</#if></textarea>
                    <p class="textarea-check-tip"><span class="J_lastNum g9"><span>0</span>/400</span></p>
                </td>
            </tr>
            <tr>
                <th>&nbsp;</th>
                <td class="input button">
                    <a href="javascript:void(0);" class="fresh formValidateSubmit margin" id="J_formSubmit" itemtype="project"><span>保存</span></a><a href="javascript:void(0);" class="normal J_cancel" itemtype="project"><span>取消</span></a>
                </td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
<script type="text/javascript">
    $(function(){
        $('.textarea-con').each(function(){
            textareaCheck($(this))
        });
        $('.textarea-con').keyup(function(){
            textareaCheck($(this))
        })
    })

</script>